<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link th:href="@{/static/plug-in/layui/css/layui.css}" rel="stylesheet" media="all"/>
    <link type="text/css" rel="stylesheet" th:href="@{/static/resources/common/css/entity.css}" media="all"/>
    <link th:href="@{/static/plug-in/icon/themify-icons/themify-icons.min.css}" rel="stylesheet"/>
    <link th:href="@{/static/plug-in/icon/plugins/ionicons/css/ionicons.min.css}" rel="stylesheet"/>
</head>
<body>
<div class="layui-custom-body">
    <header class="layui-custom-header">
        <fieldset class="layui-elem-field layui-field-title">
            <legend th:text="组织机构管理"></legend>
        </fieldset>
    </header>
    <!--/*@thymesVar id="url" type="com.wj.common.mvc.controller.BaseController"*/-->
    <form class="layui-form layui-form-pane custom-form" th:action="@{/uc/organization/entity/save}" method="post">
        <!--<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>-->
        <div class="layui-custom-domain">
            <div class="layui-custom-form">
                <div class="layui-custom-inline">
                    <div class="layui-form-item layui-custom-form-item">
                        <label class="layui-form-label">组织名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" th:value="${entity.name}" lay-verify="required" maxlength="50"
                                   placeholder="请输入组织名称" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item layui-custom-form-item">
                        <label class="layui-form-label">组织编码</label>
                        <div class="layui-input-block">
                            <input type="text" name="code" th:value="${entity.code}" lay-verify="required" maxlength="200"
                                   placeholder="组织编码" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                </div>
                <div class="layui-custom-inline">
                    <div class="layui-form-item layui-custom-form-item">
                        <label class="layui-form-label">节点类型</label>
                        <div class="layui-input-block" th:if="${entity.type==1}" >
                            <div class="layui-input" th:text="根节点" style="line-height: 40px;">

                            </div>
                        </div>
                        <div class="layui-input-block" th:unless="${entity.type==1}">
                            <div class="layui-input" th:text="普通节点" style="line-height: 40px;">

                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item layui-custom-form-item" th:unless="${entity.type==1}">
                        <label class="layui-form-label">所属父节点</label>
                        <div class="layui-input-block" >
                            <div class="layui-input" th:text="${entity.parentName}" style="line-height: 40px;">

                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-custom-inline">
                    <div class="layui-form-item layui-custom-form-item">
                        <label class="layui-form-label">排序值</label>
                        <div class="layui-input-block">
                            <input type="number" name="ordernum" th:value="${entity.ordernum}" lay-verify="required" maxlength="50"
                                   placeholder="请输入排序值" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item layui-custom-form-item">
                        <label class="layui-form-label ">状态</label>
                        <div class="layui-input-block layui-custom-input-block">
                            <input type="radio" name="state" value="0"
                                   th:title="禁用" th:checked="${1!= entity.state?true:false}"/>
                            <input type="radio" name="state" value="1"
                                   th:title="启用" th:checked="${1 == entity.state?true:false}"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <footer class="layui-custom-footer">
            <div class="layui-custom-button" th:if="${button == true}">
                <button class="layui-btn layui-btn-small custom-save" type="button">保&nbsp;&nbsp;&nbsp;&nbsp;存</button>
                <button type="reset" class="layui-btn layui-btn-small layui-btn-primary">重&nbsp;&nbsp;&nbsp;&nbsp;置</button>
            </div>
        </footer>
        <input type="hidden" th:value="${entity.id}" name="id"/>
        <input type="hidden" name="type" th:value="${entity.type}" />
        <input type="hidden" name="parentid" th:value="${entity.parentid}"/>
        <input type="hidden" name="parentCode" th:value="${entity.parentCode}"/>
        <input type="hidden" name="createdate" th:value="${entity.createdate}"/>
        <input type="hidden" name="treeCode" th:value="${entity.treeCode}"/>
        <input name="button" th:value="${button}" type="hidden"/>
        <input name="msg" th:value="${msg}" type="hidden"/>
    </form>
</div>
<script th:src="@{/static/plug-in/layui/layui.js}"></script>
<script th:src="@{/static/organization/js/entity.js}"></script>
</body>
</html>